<?php
// +----------------------------------------------------------------------
// | 文章校验
// +----------------------------------------------------------------------
namespace api\portal\validate;

use think\Validate;

class ArticlesValidate extends Validate {
	protected $rule = [
		'post_content' => 'require',
		'categories' => 'require',
	];
	protected $message = [
		'post_content.require' => '内容不能为空',
		'categories.require' => '文章分类不能为空',
	];

	protected $scene = [
		'article' => ['post_content', 'categories'],
		'page' => ['post_title'],
	];
}